package com.itheima.d1_method;

public class Test10 {
    public static void main(String[] args) {
        //直接调用：方法名（参数）   暂时没有意义！
        test();

        System.out.println("---------------");
        int c = test2(3);
        System.out.println("c="+c);


    }


    public static void test() {
        for (int i = 0; i < 10; i++) {
            System.out.println("hello");
        }
    }

    public static int test2(int a) {
        int he = 0;
        for (int i = 1; i <= a; i++) {
            he += i;

        }
        return he;
    }


}

